package com.github.hwangrq.minicat.container;

import java.util.ArrayList;
import java.util.List;

/**
 * @author hwangrq
 * @date 2021/3/17 0:21
 * @description 指的是 Service,每个 Service 下面有自己的 Host 主机集合
 */
public class Mapper {

    List<Host> hosts = new ArrayList<>();

    public Mapper() {
    }

    public Mapper(List<Host> hosts) {
        this.hosts = hosts;
    }

    public List<Host> getHosts() {
        return hosts;
    }

    public void setHosts(List<Host> hosts) {
        this.hosts = hosts;
    }

    public void addHost(Host host) {
        hosts.add(host);
    }
}
